package ex;

import java.io.File;
import java.io.FileOutputStream;

/**
 * @author wzby
 * @Date: 2022/7/30 10:13
 */
public class Ex {
    public static void main(String[] args)throws Exception {
        File f = new File("E:\\idea\\java\\ch09\\src\\f\\c.txt");
        System.out.println(f.createNewFile());
        //创建文件
        System.out.println(f.createNewFile());
        System.out.println(f.exists());
        System.out.println(f.delete());
        //删除文件
        FileOutputStream fos = new FileOutputStream("E:\\idea\\java\\ch09\\src\\f\\d.txt");
        //在文件中输出内容
        fos.write("255255".getBytes());
        System.out.println(fos);

    }
}
